package com.soft.face.global;

import lombok.Getter;

@Getter
public enum ErrorCodeEnum implements ErrorCode{

    /**
     * 成功
     */
    SUCCESS(0, "成功"),
    FAIL(-1, "失败"),
    PARAM_ERROR(2, "参数错误"),
    SYSTEM_ERROR(999, "系统错误"),
    ;
    private Integer code;
    private String message;


    ErrorCodeEnum(Integer code, String message) {
        this.code = code;
        this.message = message;
    }

    @Override
    public Integer getCode() {
        return code;
    }

    @Override
    public String getMessage() {
        return message;
    }
}
